<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>这是修改页面</title>
		<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">
		<link th:href="@{/css/dashboard.css}" rel="stylesheet">
		<style type="text/css">
			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			.chartjs-render-monitor {
				-webkit-animation: chartjs-render-animation 0.001s;
				animation: chartjs-render-animation 0.001s;
			}
		</style>
	</head>

	<body>
		<div th:insert="~{commons/commons::topbar}"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:insert="~{commons/commons::sidebar(active='list.html')}"></div>

				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

					<form class="form-horizontal" th:action="@{/update}" method="post">
						<input type="hidden" name="id" th:value="${emp.getId()}">
						<div class="form-group">
							<label class="col-sm-2 control-label">姓名</label>
							<div class="col-sm-10">
								<input th:value="${emp.getLastName()}" name="lastName" type="text" class="form-control"  placeholder="姓名">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">Email</label>
							<div class="col-sm-10">
								<input th:value="${emp.getEmail()}" name="email" type="email" class="form-control" placeholder="Email">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">性别:</label>
							<div class="form-check form-check-inline">
								<input th:checked="${emp.getGander()==1}" name="gander" type="radio" class="form-check-input" value="1">
								<label class="form-check-label">男</label>
							</div>
							<div class="form-check form-check-inline">
								<input th:checked="${emp.getGander()==0}" name="gander" type="radio" class="form-check-input" value="0">
								<label class="form-check-label">女</label>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">所属部门</label>
							<select class="col-sm-10 form-control " name="department.id">
<!--								form-control   -->
								<option th:selected="${dept.getId()==emp.getDepartment().getId()}"
										th:each="dept:${departments}" th:text="${dept.getDepartmentName()}"
										th:value="${dept.getId()}"></option>
							</select>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">生日</label>
							<div class="col-sm-10">
								<input th:value="${#dates.format(emp.getBirth(),'yyyy-MM-dd')}" name="birth" type="text"  class="form-control" placeholder="1975-01-01">
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="submit" class="btn btn-sm btn-primary">修改</button>
							</div>
						</div>

					</form>
				</main>
			</div>
		</div>
		<script type="text/javascript" th:src="@{/js/jquery-3.2.1.slim.min.js}" ></script>
		<script type="text/javascript" th:src="@{/js/popper.min.js}" ></script>
		<script type="text/javascript" th:src="@{/js/bootstrap.min.js}" ></script>
		<script type="text/javascript" th:src="@{/js/feather.min.js}" ></script>
		<script type="text/javascript" th:src="@{/js/Chart.min.js}" ></script>
	</body>

</html>